<!DOCTYPE html>
<html>
<head>
    <title>演示</title>
    <script type="text/javascript" src="tabSize.js"></script>
    <script type="text/javascript">
        window.onload = function() {
            tabSize.init('resizeTable');
        };
    </script>
    <style>
        .resizeBox{overflow-x: auto; width: 100%;}
        table{width: 100%;border: 1px solid #000;border-collapse:collapse;}
        th{background: #ccc;}
        th, td{border: 1px solid #000;}
    </style>
</head>
<body>
<div class="resizeBox">
    <table id="resizeTable">
        <thead>
        <tr><th>标题1</th><th>标题2</th><th>标题3</th></tr>
        </thead>
        <tbody>
        <tr><td>第1行</td><td>第1行</td><td>第1行</td></tr>
        <tr><td>第2行</td><td>第2行</td><td>第1行</td></tr>
        <tr><td>第3行</td><td>第3行</td><td>第1行</td></tr>
        </tbody>
    </table>
</div>
</body>
</html>